#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include <QComboBox>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QFont>
#include "medical.h"
#include "patient.h"
#include "sign_up.h"
#include <QSql>
#include <QDebug>
#include <QtSql/QSqlError>
#include <QtSql/QSqlQuery>
namespace Ui {
class Login;
}

class Login : public QWidget
{
    Q_OBJECT

public:
    explicit Login(QWidget *parent = 0);
    ~Login();

private:
    Ui::Login *ui;
    QComboBox *type;
    QLabel *account_lable;
    QLineEdit *account_line;
    QLabel *passwd_lable;
    QLineEdit *passwd_line;
    QPushButton *Login_ptn;
    QPushButton *signup_ptn;
    Medical *doctor;
    patient *P;
    sign_up *S;
    int DATABASE_Login();
    int MYSQL_CON();
    QSqlDatabase db1;
    QString Account_text;//保存输入的用户名
    QString Passed_text;//保存输入的密码
public slots:
    void on_Login_ptn_clicked();
    void signup_ptn_clicked();

};

#endif // LOGIN_H
